<script type="text/javascript" src="{compress file='design/js/jquery.js'}"></script>
<script type="text/javascript" src="{compress file='design/js/jquery.corner.js'}"></script>
{literal}
<script type="text/javascript">
	$(document).ready(function()
	{
	    $('#rounded').corner('15px top');
	    $('#rounded-bottom').corner('15px bottom');
	    $('#round_hot_video').corner('15px');
	    $('#round_box_top').corner('15px top');
	})

	function change_videos(sName, iId)
	{
		document.getElementById('ajax_image_box').style.display='';
		document.getElementById('video_menu_1').className='item';
		document.getElementById('video_menu_2').className='item';
		document.getElementById('video_menu_3').className='item';
		document.getElementById('video_menu_4').className='item';
		document.getElementById('video_menu_'+ iId +'').className='item2';
		xajax_videoBox(sName);
	}

</script>
{/literal}

{messages}
<table style="width:100%;" cellpadding="0" cellspacing="8">
<tr>
<td style="width:65%; vertical-align:top;">

	<div class="jquery_background">
	<div id="rounded" class="border13" style="padding:10px;">
		<div><input type="hidden" id="current_page_count" name="current_page_count" value="1" /></div>
		<div id="latest_added">{Video::AjaxLatest iNum=1}</div>
	</div>
	<div id="rounded-bottom" class="border13" style="">&nbsp;</div>
	</div>

	<div style="padding:10px;">
		<a class="link_action" href="{url link='public.videos' type='recent'}">[ {language text="core_view_more"} ]</a>
		<span id="ajax_image_latest" style="font-size: 9pt; position:absolute; padding-left:5px; display:none;">
			<img src="design/pic/loader.gif" alt="" style="vertical-align:middle;" /> {language text='Mod_Video.loading_videos'}
		</span>
	</div>

	<br />
	<br />
	<div style="font-size:12pt; font-weight:bold; padding-bottom:4px; letter-spacing:2px; padding-right:15px;">
		<span id="info_title">{language text='Mod_Video.ajaxbox.featured'}</span>
		<span id="ajax_image_box" style="font-size: 9pt; position:absolute; padding-left:5px; display:none;">
			<img src="design/pic/loader.gif" alt="" style="vertical-align:top;" /> {language text='Mod_Video.loading_videos'}
		</span>
	</div>
	<div class="jquery_background">
	<table style="width:100%;" cellpadding="0" cellspacing="0" class="border2" id="round_box_top">
	<tr>
		<td style="font-size:8pt;">

		<table style="width:100%;" cellpadding="0" cellspacing="0">
		<tr>
			<td style="font-size:8pt;" class="color">
				<div class="border13">
				<br />
				<table style="width:100%;" cellpadding="0" cellspacing="0">
					<tr>
						<td style="padding-right:5px;width:20%;" class="item3"></td>
							<td id="video_menu_1" class="item2" style="vertical-align:bottom;text-align:center;" onclick="change_videos('featured', '1');">
								<a href="javascript:void(0);">{language text='Mod_Video.box.featured'}</a>
						</td>
						<td class="item3">&nbsp;</td>
							<td id="video_menu_2" class="item" style="vertical-align:bottom;text-align:center;" onclick="change_videos('most_viewed', '2');">
								<a href="javascript:void(0);">{language text='Mod_Video.box.viewed'}</a>
						</td>
						<td class="item3">&nbsp;</td>
						<td id="video_menu_3" class="item" style="vertical-align:bottom;text-align:center;" onclick="change_videos('most_comments', '3');">
								<a href="javascript:void(0);">{language text='Mod_Video.box.comments'}</a>
						</td>
						<td class="item3">&nbsp;</td>
						<td id="video_menu_4" class="item" style="vertical-align:bottom;text-align:center;" onclick="change_videos('rating', '4');">
								<a href="javascript:void(0);">{language text='Mod_Video.box.rating'}</a>
						</td>
						<td class="item3">&nbsp;</td>
						<td style="padding-right:5px;width:10px;" class="item3"></td>
					</tr>
				</table>
				</div>

				<br />
				<br />

				<div style="padding:8px;">
					<div id="video_box">{Video::AjaxBox sType='featured'}</div>
				</div>

				</td>
			</tr>
		</table>
		</td>
	</tr>
	</table>
	</div>
</td><td style="width:35%; vertical-align:top;">

	{if $aRand}
	<div style="text-align:center;">
		<div style="font-size:10pt; font-weight:bold; padding-bottom:10px;">{language text='Mod_Video.hot_video'}</div>
		{videoplayer url=$vidUrl width='250' height='150'}
		<div class="jquery_background">
		<div style="text-align:left; margin-top:6px; padding:8px;" class="border13" id="round_hot_video">
			<span style="font-size:10pt; font-weight:bold;"><a href="{url link='public.videos' id=$aRand.vid_id foxseotitle=$aRand.vid_title}">{$aRand.vid_title|escape|clean}</a></span>
			<div style="padding:6px;">
				{language text='Mod_Video.added.on'}: {$aRand.vid_time|date_format:$sDateTimeFormat}
				<br />
				{language text='Mod_Video.add.by'}: <a href="{url link='public.user' name=$aRand.user}">{$aRand.user}</a>
			</div>
			{if isStaff()}
			<div style="padding:4px; text-align:right;">
				( <a href="{url link='public.videos' dhotvideo='true'}">{language text='Mod_Video.remove_hot_video'}</a> )
			</div>
			{/if}
		</div>
		</div>
	</div>
	<br />
	{/if}

    <table style="width: 100%;" cellpadding="4" cellspacing="0">
    <tr>
    <td class="border2">
    	<table style="width: 100%;cursor:pointer;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0" onclick="SwitchMenu('sub6','hidetext6')">
        <tr>
        <td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
        <td class="block_header">{language text='Mod_Video.block_categories'}</td>
        <td style="text-align:right;padding-right:4px;"><span class="cur" id="hidetext6">[-]</span></td>
        </tr>
        </table>
        <div class="submenu" id="sub6" style="padding:4px; text-align:center;">
        <table style="font-size:10pt; font-weight:bold; width:100%;">
        <tr>
		{foreach from=$aCats item=aItem key=iNum}
		<td style="width:50%;">
			<a href="{url link='public.videos' listid=$aItem.list_id foxseotitle=$aItem.list_name}">{language translate=$aItem.list_name}</a>
		</td>
		{if $iNum is odd}
		</tr><tr>
		{/if}
		{/foreach}
		</td>
		<td>
		</tr>
		</table>
		</div>
    </td>
    </tr>
    </table>
	<br />

	{Tag::List type='videos'}

	<table cellpadding="0" cellspacing="0" border="0" width="100%">
	<tr>
	    <td align="center">
	        {Ads::ShowAds place=4}
	    </td>
	</tr>
	</table>

</td>
</tr>
</table>